home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / termsorc.lha / Extras / Source / gtlayout-source.lha / LTP_DrawIncrementer.c < prev    next >
C/C++ Source or Header  |  1995-09-24  |  652b  |  39 lines

  1. /*  GadTools layout toolkit
  2. **
  3. **  Copyright © 1993-1995 by Olaf `Olsen' Barthel
  4. **  Freely distributable.
  5. */
  6.  
  7. #include "gtlayout_global.h"
  8.  
  9. VOID __regargs
  10. LTP_DrawIncrementer(struct RastPort *rp,BOOLEAN leftDirection,LONG left,LONG top,LONG width,LONG height)
  11. {
  12.     LONG middle;
  13.     LONG x0,x1;
  14.     LONG stop;
  15.  
  16.     middle = height / 2;
  17.  
  18.     if(leftDirection)
  19.     {
  20.         x0 = left + 2;
  21.         x1 = left + width - 3;
  22.     }
  23.     else
  24.     {
  25.         x0 = left + width - 3;
  26.         x1 = left + 2;
  27.     }
  28.  
  29.     if(height > width)
  30.         stop = (width - 4) / 2;
  31.     else
  32.         stop = (height - 4) / 2;
  33.  
  34.     Move(rp,x0,top + middle);
  35.     Draw(rp,x1,top + middle - stop);
  36.     Move(rp,x0,top + middle);
  37.     Draw(rp,x1,top + middle + stop);
  38. }
  39.